package com.xiezhr.pbideaapitestdemo.webservise.impl;

import com.xiezhr.pbideaapitestdemo.entity.Student;
import com.xiezhr.pbideaapitestdemo.webservise.CodeServise;
import jakarta.jws.WebService;

import java.util.ArrayList;
import java.util.List;

/**
 * @program: pbideaApiTestDemo
 * @description:
 * @author: xie.zhr
 * @create: 2024-12-09 10:54
 **/
@WebService
public class CodeServiseImpl implements CodeServise {
    private List<Student> students;


    public  CodeServiseImpl() {
        students = new ArrayList<>();
        // 添加一些示例数据
        students.add(new Student("S001", "晓凡", 18, "男", "计算机科学", "xiezhr@qq.com", "13800000001"));
        students.add(new Student("S002", "李四", 20, "女", "电子工程", "lisi@example.com", "13800000002"));
        students.add(new Student("S003", "王五", 19, "男", "机械工程", "wangwu@example.com", "13800000003"));
        students.add(new Student("S004", "张三", 19, "男", "机械工程", "zhangsan@example.com", "13800000003"));
    }
    @Override
    public List<Student> getAllStudents() {
        return students;
    }
}
